home *** CD-ROM | disk | FTP | other *** search
- Path: news.production.compuserve.com!news
- From: anw <102044.3670@CompuServe.COM>
- Newsgroups: comp.lang.c++
- Subject: Standard struct layout in C++?
- Date: 19 Apr 1996 04:03:04 GMT
- Organization: CompuServe, Inc. (1-800-689-0736)
- Message-ID: <4l739o$gt4$2@mhade.production.compuserve.com>
-
- Does C++ guarantee any data layout in classes (or structs)? I
- can't find any reference in Ellis and Stroustrup (the ARM). The
- problem I am trying to solve is reading and writing blocks of data
- that represent classes or structures; e.g.:
-
- class foo;
-
- read(fd, buffer, sizeof(foo));
-
- Thanx,
-
- anw
-